# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-yara
_pkgname="${pkgname/py3-/}-python"
pkgver=4.2.0
pkgrel=1
pkgdesc="The Python interface for YARA"
url="https://virustotal.github.io/yara/"
arch="all !armv7 !armhf" # missing yara
license="Apache-2.0"
depends="python3"
makedepends="python3-dev yara-dev py3-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/VirusTotal/yara-python/archive/v$pkgver.tar.gz
	use-system-yara.patch
	"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build --dynamic-linking
}

check() {
	python3 setup.py check
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
ba08d709fc51679ec9fe36165e0864b79fc241f85c681bf59823fe7bb0e34e928cded050ff296147eb5bcb837485f39949aa93425a0eb9ca8b3730e60fac93f4  py3-yara-4.2.0.tar.gz
d56d2c437f66b0d3c5bc92737f6b5c7bf5191e38fe4f72849145dbcbc2eb7d9cad10a2d07674c25aaa1e7f542b21e723c30722516e722db5c238840e4f6be07a  use-system-yara.patch
"
